package org.example.beetlsql.mapper;

import com.beetl.sql.rewrite.annotation.DisableRewrite;
import com.beetl.sql.rewrite.mapper.RewriteBaseMapper;
import org.apache.catalina.valves.rewrite.RewriteMap;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.AutoMapper;
import org.beetl.sql.mapper.annotation.SqlResource;
import org.beetl.sql.mapper.internal.InsertAMI;
import org.example.beetlsql.entity.Book;

import java.util.List;

@SqlResource("book")
public interface BookMapper extends RewriteBaseMapper<Book> {
    List<Book> queryByName(String name);
	@DisableRewrite //禁止重写sql，因此此查询不包含数据权限
	List<Book> allBooks();

	@DisableRewrite // insert禁止重写sql
	@AutoMapper(InsertAMI.class)
	int insert(Book entity);
}
